# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
    cmake_minimum_required(VERSION 3.16)
    project(qprocess LANGUAGES CXX)
    find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()

add_subdirectory(test)
add_subdirectory(testProcessCrash)
add_subdirectory(testProcessEcho)
add_subdirectory(testProcessEcho2)
add_subdirectory(testProcessEcho3)
add_subdirectory(testProcessEnvironment)
add_subdirectory(testProcessHang)
add_subdirectory(testProcessNormal)
add_subdirectory(testProcessOutput)
add_subdirectory(testProcessDeadWhileReading)
add_subdirectory(testProcessEOF)
add_subdirectory(testExitCodes)
add_subdirectory(testForwarding)
add_subdirectory(testForwardingHelper)
if(TARGET Qt::Widgets)
    add_subdirectory(testGuiProcess)
endif()
add_subdirectory(testDetached)
add_subdirectory(fileWriterProcess)
add_subdirectory(testSetWorkingDirectory)
add_subdirectory(testSoftExit)
add_subdirectory(testProcessSpacesArgs)
add_subdirectory(testSpaceInName)
if(WIN32)
    add_subdirectory(testProcessEchoGui)
    add_subdirectory(testSetNamedPipeHandleState)
endif()
if(UNIX)
    add_subdirectory(testUnixProcessParameters)
endif()
